package com.killer.redissessiondemo.service;

import com.killer.redissessiondemo.pojo.Resume;
import com.killer.redissessiondemo.repository.ResumeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：Killer
 * @date ：Created in 20-11-16 下午2:51
 * @description：${description}
 * @modified By：
 * @version: version
 */
@Service
public class ResumeService {

    @Autowired
    private ResumeRepository resumeRepository;


    public List<Resume> list(){
        return resumeRepository.findAll();
    }


    public void addResume(Resume resume) {
        resumeRepository.save(resume);
    }

    public void deleteResume(Long id) {
        resumeRepository.deleteById(id);
    }
}
